q == compose(f, p);
q == compose(g, p);
